import request from '@/utils/request'
export const listEmp = (search) => 
    request({
        url: '/emp/listAllEmp',
        method: 'get',
        params: {
            name: search.name,
            sort: search.sort,
            offset: search.offset,
            limit: search.limit
        }
    })
export const getEmp = (id) => 
    request({
        url: '/emp/getEmp',
        method: 'get',
        params: {
            id:id
        }
    })
export const addEmp = (search) => 
    request({
        url: '/emp/addEmp',
        method: 'post',
        params: {
            name: search.name,
            sort: search.sort,
            offset: search.offset,
            limit: search.limit
        }
    })

export const updateEmp = (id,model) => 
    request({
        url: '/emp/updateEmp',
        method: 'post',
        params: {
            id:id,
            empNum:model.empNum,
            empName:model.empName
        }
    })